﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TicketsPhone.Domain.Access;
using TicketsPhone.Domain.Entities;

namespace TicketsPhone.Domain.Access
{
    public class PaisRepositorio : ConexionSql<Pais>, ICrud<Pais>
    {

        public int Crear()
        {
            throw new NotImplementedException();
        }

        public bool Editar()
        {
            throw new NotImplementedException();
        }

        public bool Eliminar(int id)
        {
            throw new NotImplementedException();
        }

        public Pais Cargar(int id)
        {
            throw new NotImplementedException();
        }

        public List<Pais> ObtenerTodos()
        {
            CrearComando("spPais_Obtener");
            ExecuteReader();

            List<Pais> lista = new List<Pais>();

            while (Read())
            {
                Pais obj = new Pais();
                obj.Nombre = GetStringValue("Nombre");
                obj.IdPais = GetIntValue("IdPais");
                lista.Add(obj);
            }

            return lista;
        }

        public List<Pais> Filtrar()
        {
            throw new NotImplementedException();
        }
    }
}
